import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import com.wankuma.hcm.midlet.metwit.MainScreen;


public class METwit extends MIDlet {
	
	private boolean isPausing = false;
	
	private static METwit instance;
	private static Display display;
	private static MainScreen mainScreen;

	public static METwit getInstance() {
		return instance;
	}

	public static Display getDisplay() {
		return display;
	}

	public static MainScreen getMainScreen() {
		return mainScreen;
	}

	public METwit() {
		METwit.instance = this;
		METwit.display = Display.getDisplay(this);
		METwit.mainScreen = new MainScreen();
	}

	protected void startApp() throws MIDletStateChangeException {
		if(!isPausing){
			showMainScreen();
		}
		isPausing = false;
	}

	public void showMainScreen() {
		display.setCurrent(mainScreen);
	}

	protected void pauseApp() {
		isPausing = true;
	}

	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
		// TODO Auto-generated method stub
	}
}
